package com.ruoyi.business.domain.vo;


import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("作业视图对象")
public class HomeWorkStuVo implements Serializable {

    private String id;

    private String courseId;

    /**
     * 作业名
     */
    private String homeworkName;

    private String courseName;

    /**
     * 章节id
     */
    private String chapterId;

    private String chapterName;

    /**
     * 作业的状态
     */
    private Boolean status;

    /**
     * 班级id
     */
    private String classIds;

    /**
     * 开始时间
     */
    private Date begTime;

    /**
     * 截止时间
     */
    private Date endTime;

    /**
     * 作业完成时间
     */
    private Date finishTime;

    /**
     * 是否完成
     */
    private Boolean finished;

    /**
     * 关联的学生id
     */
    private String uploadUser;

    private String type;

    private String context;

    private String answer;

    private String objContext;

    private String analysis;

    private Integer hard;

    private String score;

    private String charpter;

    private String uploadTeacher;

    /**
     * 作业详情
     */
    private String workDetail;

    /**
     * 作业的问题列表
     */
    private List<String> questions;

    /**
     * 作业附件
     */
    private String enclosure;

    public String getBegTime() {
        if (null == this.begTime) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return sdf.format(this.begTime);
    }

    public String getEndTime() {
        if (null == this.endTime) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return sdf.format(this.endTime);
    }
}
